package cn.doitedu;

import ch.hsr.geohash.GeoHash;
import org.apache.hadoop.hive.ql.exec.UDF;

public class GpsToGeoHashUDF extends UDF {

    public String evaluate(Double lat,Double lng ){
        String geohash;

        try{
            geohash = GeoHash.geoHashStringWithCharacterPrecision(lat,lng,6);
        }catch (Exception e){
            return "";
        }


        return geohash;
    }


}
